# -*— coding: utf-8 -*-
#
# @Time : 2023/09/12 12:20
# @Author : LeeLU
# @File : chrome_driver.py
# @IDE : PyCharm
# @Email : luxuan888@vip.qq.com
# @Wechat : qianyongbuwan
from selenium import webdriver
import undetected_chromedriver as uc
# from seleniumbase import Driver

options = webdriver.ChromeOptions()
options.add_argument('--disable-blink-features=AutomationControlled')
options.add_argument('--disable-infobars')  # 禁用浏览器正在被自动化程序控制的提示
options.add_argument('user-agent="Mozilla/5.0 (X11; Linux x86_64)   AppleWebKit/537.36 (KHTML, like Gecko) '
                     'Chrome/81.0.4044.122 Safari/537.36"')


options.add_experimental_option('detach', True)  # 这两句控制的是执行完毕是否关闭chrome
wd = webdriver.Chrome(options=options)  # 这句也是
#wd = Driver(uc=True)

